class Recording
{

	public var record : List<rules.GameMessage>;
	public var name : String;
	public var group : String;
	public var seed : Int;

	public function new()
	{
	}

	public function assign(record : List<rules.GameMessage>,
						   name : String,
						   group : String, seed : Int)
   {

		this.record = record;
		this.name = name;
		this.group = group;
		this.seed = seed;

		shrink();

	}
	
	public function shrink()
	{
		var newrec = new List<rules.GameMessage>();
		var rlen = record.length;
		for (n in record)
		{
			var last = newrec.last();
			if (n.style==rules.GameMessage.msg_runsim && 
				last!=null &&
				last.style==rules.GameMessage.msg_runsim)
			{
				last.message+=n.message;
			}
			else
			{
				newrec.add(n);
			}
		}
		record = newrec;
	}
	
}
